﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace YourFileWatcher
{
    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class App : Application
    {
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            InitializeDirectory();
        }

        /// <summary>
        /// 程序必需的程序目录，保证目录的可用性
        /// </summary>
        private void InitializeDirectory()
        {
            var directorys = new string[] { "Logs" };

            foreach (var iDir in directorys)
            {
                if (!Directory.Exists(iDir))
                {
                    Directory.CreateDirectory(iDir);
                }
            }
        }
    }
}
